describe("navigation", function () {

    describe("goToPage", function () {

        it("goToPage - Test Page Url", function () {
            var url = "http://www.w3schools.com",
                fakeUrl = {};

            fakeUrl.location = "www.google.com";
            navigation.goToPage(url, fakeUrl);
            expect(fakeUrl.location).toEqual(url);
        });

        it("should throw exception to object", function () {

            expect(
                function() {navigation.goToPage({})})
                    .toThrow("You need to put correct url {string}");

        });

        it("should throw exception to empty array", function () {

            expect(
                function() {navigation.goToPage([])})
                    .toThrow("You need to put correct url {string}");

        });

        it("should throw exception to undefined", function () {

            expect(
                function() {navigation.goToPage(undefined)})
                    .toThrow("You need to put correct url {string}");

        });

        it("should throw exception to null", function () {

            expect(
                function() {navigation.goToPage(null)})
                    .toThrow("You need to put correct url {string}");

        });

    });

});
